package org.omg.IIOP;

//
// Helper class for : ListenPointList
//
// @author OpenORB Compiler
//
public class ListenPointListHelper {
	//
	// Insert ListenPointList into an any
	// @param a an any
	// @param t ListenPointList value
	//
	public static void insert(org.omg.CORBA.Any a, org.omg.IIOP.ListenPoint[] t) {
		a.insert_Streamable(new org.omg.IIOP.ListenPointListHolder(t));
	}

	//
	// Extract ListenPointList from an any
	// @param a an any
	// @return the extracted ListenPointList value
	//
	public static org.omg.IIOP.ListenPoint[] extract(org.omg.CORBA.Any a) {
		return read(a.create_input_stream());
	}

	//
	// Internal TypeCode value
	//
	private static org.omg.CORBA.TypeCode _tc = null;

	//
	// Return the ListenPointList TypeCode
	// @return a TypeCode
	//
	public static org.omg.CORBA.TypeCode type() {
		if (_tc == null) {
			org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
			_tc = orb.create_alias_tc(
					id(),
					"ListenPointList",
					orb.create_sequence_tc(0,
							org.omg.IIOP.ListenPointHelper.type()));
		}
		return _tc;
	}

	//
	// Return the ListenPointList IDL ID
	// @return an ID
	//
	public static String id() {
		return _id;
	}

	private final static String _id = "IDL:omg.org/IIOP/ListenPointList:1.0";

	//
	// Read ListenPointList from a marshalled stream
	// @param istream the input stream
	// @return the readed ListenPointList value
	//
	public static org.omg.IIOP.ListenPoint[] read(
			org.omg.CORBA.portable.InputStream istream) {
		org.omg.IIOP.ListenPoint[] new_one;
		{
			int size1 = istream.read_ulong();
			new_one = new org.omg.IIOP.ListenPoint[size1];
			for (int i1 = 0; i1 < new_one.length; i1++) {
				new_one[i1] = org.omg.IIOP.ListenPointHelper.read(istream);

			}
		}

		return new_one;
	}

	//
	// Write ListenPointList into a marshalled stream
	// @param ostream the output stream
	// @param value ListenPointList value
	//
	public static void write(org.omg.CORBA.portable.OutputStream ostream,
			org.omg.IIOP.ListenPoint[] value) {
		ostream.write_ulong(value.length);
		for (int i1 = 0; i1 < value.length; i1++) {
			org.omg.IIOP.ListenPointHelper.write(ostream, value[i1]);

		}
	}

}
